<?php

use function Hyperf\Support\env;

return [
    /** 公众平台 */
    'wechat' => [
        'app_id' => env('WECHAT_APP_ID'),
        'secret' => env('WECHAT_SECRET'),
        'token' => env('WECHAT_TOKEN'),
        'aes_key' => env('WECHAT_AES_KEY', ''), // 明文模式请勿填写 EncodingAESKey

        /**
         * OAuth 配置
         *
         * scopes：公众平台（snsapi_userinfo / snsapi_base），开放平台：snsapi_login
         * callback：OAuth授权完成后的回调页地址
         */
        'oauth' => [
            'scopes'   => ['snsapi_userinfo'],
            'callback' => '/shop/v1/oauth'
        ],

        /**
         * 接口请求相关配置，超时时间等，具体可用参数请参考：
         * https://github.com/symfony/symfony/blob/5.3/src/Symfony/Contracts/HttpClient/HttpClientInterface.php
         */
        'http' => [
            'timeout' => 5.0,

            'retry' => true
        ]
    ],
    /** 开放平台-网站应用 */
    'open' => [
        'app_id' => env('WECHAT_OPEN_APP_ID'),
        'secret' => env('WECHAT_OPEN_SECRET'),
        'token' => env('WECHAT_OPEN_TOKEN'),
        'aes_key' => env('WECHAT_OPEN_AES_KEY', ''), // 明文模式请勿填写 EncodingAESKey

        /**
         * 接口请求相关配置，超时时间等，具体可用参数请参考：
         * https://github.com/symfony/symfony/blob/5.3/src/Symfony/Contracts/HttpClient/HttpClientInterface.php
         */
        'http' => [
            'throw'  => true, // 状态码非 200、300 时是否抛出异常，默认为开启
            'timeout' => 5.0,

            'retry' => true
        ]
    ],
    /** 开放平台-第三方平台 */
    'open_third' => [
        'app_id' => env('WECHAT_OPEN_THIRD_APP_ID'),
        'secret' => env('WECHAT_OPEN_THIRD_SECRET'),
        'token' => env('WECHAT_OPEN_THIRD_TOKEN'),
        'aes_key' => env('WECHAT_OPEN_THIRD_AES_KEY', ''), // 明文模式请勿填写 EncodingAESKey

        /**
         * 接口请求相关配置，超时时间等，具体可用参数请参考：
         * https://github.com/symfony/symfony/blob/5.3/src/Symfony/Contracts/HttpClient/HttpClientInterface.php
         */
        'http' => [
            'throw'  => true, // 状态码非 200、300 时是否抛出异常，默认为开启
            'timeout' => 5.0,

            'retry' => true
        ]
    ],
    /** 小程序 */
    'mini' => [
        /**
         * 账号基本信息，请从微信公众平台/开放平台获取
         */
        'app_id'  => env('WECHAT_MINI_APP_ID'),         // AppID
        'secret'  => env('WECHAT_MINI_APP_SCRIPT'),     // AppSecret
        'token'   => env('WECHAT_MINI_TOKEN'),          // Token
        'aes_key' => env('WECHAT_MINI_AES_KEY'),                    // EncodingAESKey，兼容与安全模式下请一定要填写！！！

        /**
         * 接口请求相关配置，超时时间等，具体可用参数请参考：
         * https://github.com/symfony/symfony/blob/5.3/src/Symfony/Contracts/HttpClient/HttpClientInterface.php
         */
        'http' => [
            'throw'  => true, // 状态码非 200、300 时是否抛出异常，默认为开启
            'timeout' => 5.0,

            'retry' => true, // 使用默认重试配置
        ]
    ],

    /** 衫德 */
    'sandpay' => [
        'domain' => 'http://pay.youngbuy.com/sandpay/'
    ],

    /** SafePay */
    'safepay' => [
        'domain' => 'http://pay.youngbuy.com',
        'prefix' => '/safepay/'
    ],

    /** 万里牛ERP */
    'erp' => [
        'api' => [
            'url' => 'https://open-api.hupun.com/api/',
            'app_key' => '3923512014',
            'app_secret' => '3f2d99857138752ca736ed42eaeb58e3',
        ],
        'b2c' => [
            'url' => 'https://erp-open.hupun.com/api/',
            'app_key' => '22U3SY9',
            'app_secret' => 'DE0E37F89E0D3C079E94A56E60A333F4',
        ],
        'edition' => 'v1'
    ],

    /** 阿里云 */
    'alicloud' => [
        /** 物流接口 */
        'logistics' => [
            'domain' => 'https://wuliu.market.alicloudapi.com',
            'app_code' => 'e82f1b3d9a774ac7ab89715440dcd6e7',
            'app_key' => '203806336',
            'app_secret' => 'ahgwih1daldr9o1nkm2jkomvanjszxpx'
        ]
    ],

    /** 创蓝云 */
    'chuanglan' => [
        'id_card_auth' => [
            'app_id' => 'kk4plpT4',
            'app_key' => 'a8ijLX6b',
            'url' => 'https://api.253.com/open/idcard/id-card-auth/vs'
        ],
        'message' => [
            ''
        ]
    ],

    // 推单工具接口
    'push_order' => [
        'url' => 'http://push.youngbuy.com/'
    ],

    'payment' => [
        'neopayMini' => [
            '4' => [
                'url' => 'https://neopay.bhecard.com:8801/',
                'mid' => '000467',
                'login_id' => '17701829823',
                'login_password' => 'Cgh171229~',
                'app_id' => 'wx8da0de6f6e0c2a5d',
                'pre_ebp_code' => '31119602H4',
                'private_cert_path' => BASE_PATH . '/storage/cert/neopay/shop4/privateKey.pem',
                'public_cert_path' => BASE_PATH . '/storage/cert/neopay/shop4/ysPublicKey.pem',
                'jump' => false
            ],
//            '4' => [
//                'url' => 'https://kjplatformsit.easypay.com.cn:8047/',
//                'mid' => '000712',
//                'login_id' => 'YS000712',
//                'login_password' => 'e3d2f1f142f54b9c809f4d2de794df53',
//                'app_id' => 'wx8da0de6f6e0c2a5d',
//                'pre_ebp_code' => '31119602H4',
//                'private_cert_path' => BASE_PATH . '/storage/cert/neopay/shop4/privateKeyTest.pem',
//                'public_cert_path' => BASE_PATH . '/storage/cert/neopay/shop4/ysPublicKeyTest.pem',
//            ]
        ],
        'neopayWechat' => [
            '4' => [
                'url' => 'https://neopay.bhecard.com:8801/',
                'mid' => '000467',
                'login_id' => '17701829823',
                'login_password' => 'Cgh171229~',
                'app_id' => 'wx3a40808220058a55',
                'pre_ebp_code' => '31119602H4',
                'private_cert_path' => BASE_PATH . '/storage/cert/neopay/shop4/privateKey.pem',
                'public_cert_path' => BASE_PATH . '/storage/cert/neopay/shop4/ysPublicKey.pem',
                'jump' => false
            ],
        ],
        'wechatMini' => [
            '4' => [
                'app_id'  => 'wx8da0de6f6e0c2a5d',         // AppID
                'secret'  => '40f4d670d3202fc68e1d034f7dc7c25d',     // AppSecret
                'token'   => '',          // Token
                'aes_key' => '',                    // EncodingAESKey，兼容与安全模式下请一定要填写！！！
                'mch_id' => '1601825109',
                // 商户证书
                'private_key' => BASE_PATH . '/storage/cert/wechat/shop4/apiclient_key.pem',
                'certificate' => BASE_PATH . '/storage/cert/wechat/shop4/apiclient_cert.pem',

                // v3 API 秘钥
                'secret_key' => 'OdsZr6ZXeq9RQAGUle67IlNov0RjFya0',

                // v2 API 秘钥
                'v2_secret_key' => 'OdsZr6ZXeq9RQAGUle67IlNov0RjFya0',

                'platform_certs' => [
                    'PUB_KEY_ID_0116018251092025050900321879001400' =>
                        BASE_PATH . '/storage/cert/wechat/shop4/pub_key.pem',
                    '2283E630EB44B65E3C4446AFE6A35EB3F9B1B328' =>
                        BASE_PATH . '/storage/cert/wechat/shop4/wechatpay_2283E630EB44B65E3C4446AFE6A35EB3F9B1B328.pem',
                ],

                'pre_ebp_code' => '31119602H4',
                'customs' => 'SHANGHAI_ZS',

                'http' => [
                    'throw'  => true, // 状态码非 200、300 时是否抛出异常，默认为开启
                    'timeout' => 5.0,

                    'retry' => true, // 使用默认重试配置
                ]
            ],
            '6' => [
                'app_id'  => 'wxa9d8a2dfcd09df9d',         // AppID
                'secret'  => 'f64436a4c2656f8b827e74471c36ff54',     // AppSecret
                'token'   => '',          // Token
                'aes_key' => '',                    // EncodingAESKey，兼容与安全模式下请一定要填写！！！
                'mch_id' => '1601825109',
                // 商户证书
                'private_key' => BASE_PATH . '/storage/cert/wechat/shop4/apiclient_key.pem',
                'certificate' => BASE_PATH . '/storage/cert/wechat/shop4/apiclient_cert.pem',

                // v3 API 秘钥
                'secret_key' => 'OdsZr6ZXeq9RQAGUle67IlNov0RjFya0',

                // v2 API 秘钥
                'v2_secret_key' => 'OdsZr6ZXeq9RQAGUle67IlNov0RjFya0',

                'platform_certs' => [
                    'PUB_KEY_ID_0116018251092025050900321879001400' =>
                        BASE_PATH . '/storage/cert/wechat/shop4/pub_key.pem',
                    '2283E630EB44B65E3C4446AFE6A35EB3F9B1B328' =>
                        BASE_PATH . '/storage/cert/wechat/shop4/wechatpay_2283E630EB44B65E3C4446AFE6A35EB3F9B1B328.pem',
                ],

                'pre_ebp_code' => '31119602H4',
                'customs' => 'SHANGHAI_ZS',

                'http' => [
                    'throw'  => true, // 状态码非 200、300 时是否抛出异常，默认为开启
                    'timeout' => 5.0,

                    'retry' => true, // 使用默认重试配置
                ]
            ],
            '8' => [
                'app_id'  => 'wx651dd974dd99f7f8',         // AppID
                'secret'  => '9576b6af131a9ed98c3dfd158304e7e4',     // AppSecret
                'token'   => '',          // Token
                'aes_key' => '',                    // EncodingAESKey，兼容与安全模式下请一定要填写！！！
                'mch_id' => '1601825109',
                // 商户证书
                'private_key' => BASE_PATH . '/storage/cert/wechat/shop4/apiclient_key.pem',
                'certificate' => BASE_PATH . '/storage/cert/wechat/shop4/apiclient_cert.pem',

                // v3 API 秘钥
                'secret_key' => 'OdsZr6ZXeq9RQAGUle67IlNov0RjFya0',

                // v2 API 秘钥
                'v2_secret_key' => 'OdsZr6ZXeq9RQAGUle67IlNov0RjFya0',

                'platform_certs' => [
                    'PUB_KEY_ID_0116018251092025050900321879001400' =>
                        BASE_PATH . '/storage/cert/wechat/shop4/pub_key.pem',
                    '2283E630EB44B65E3C4446AFE6A35EB3F9B1B328' =>
                        BASE_PATH . '/storage/cert/wechat/shop4/wechatpay_2283E630EB44B65E3C4446AFE6A35EB3F9B1B328.pem',
                ],

                'pre_ebp_code' => '31119602H4',
                'customs' => 'SHANGHAI_ZS',

                'http' => [
                    'throw'  => true, // 状态码非 200、300 时是否抛出异常，默认为开启
                    'timeout' => 5.0,

                    'retry' => true, // 使用默认重试配置
                ]
            ],
        ],
        'sandpayMini' => [
//            '6' => [
//                'url' => 'https://openapi-uat01.sand.com.cn/',
//                'access_mid' => '68888TS128933',
//                'app_name' => '然健环球荟',
//                'app_id' => 'wxa9d8a2dfcd09df9d',
//                'mid' => '68888TS128933',
//                'public_cert_path' => BASE_PATH . '/storage/cert/sandpay/sand-test.cer',
//                'private_cert_path' => BASE_PATH . '/storage/cert/sandpay/sanduatprikey.pfx',
//                'private_cert_password' => '123456'
//            ],
            '6' => [
                'url' => 'https://openapi.sandpay.com.cn/',
                'access_mid' => '6888801128933',
                'app_name' => '然健环球荟',
                'app_id' => 'wxa9d8a2dfcd09df9d',
                'mid' => '6888801128933',
                'public_cert_path' => BASE_PATH . '/storage/cert/sandpay/sand_pro.cer',
                'private_cert_path' => BASE_PATH . '/storage/cert/sandpay/sandprivateCert.pfx',
                'private_cert_password' => '182008',
                'bs_eb_pl_code' => '44019439DD',
                'bs_eb_pl_name' => '然健环球（中国）日用品有限公司',
                'bs_eb_com_code' => '44019439DD',
                'bs_eb_com_name' => '然健环球(中国)日用品有限公司'
            ]
        ],
        'sumpayMini' => [
//            '4' => [
//                'url' => 'https://test.sumpay.cn/entrance/gateway.htm',
//                'mer_no' => 's100000040', # 商户在统统付平台的标识，由统统付统一分配。
//                'sub_mer_no' => '', # 二级商户编号
//                'mer_app_id' => 's100000040', # 由平台统一分配合作商户唯一标识
//                'app_id' => 'wx8da0de6f6e0c2a5d', # 微信小程序ID
//                'private_cert_path' => BASE_PATH . '/storage/cert/sumpay/shop4/yixuntiankong.pfx',
//                'public_cert_path' => BASE_PATH . '/storage/cert/sumpay/shop4/dev_pub.pem',
//                'password' => 'sumpay',
//                'eport_code' => '200000',
//                'eport_company_code' => '31119602H4',
//                'eport_company_name' => '上海数析信息技术有限公司'
//            ],
            '4' => [
                'url' => 'https://entrance.sumpay.cn/gateway.htm',
                'mer_no' => '200102913955118', # 商户在统统付平台的标识，由统统付统一分配。
                'sub_mer_no' => '', # 二级商户编号
                'mer_app_id' => '200102913955118', # 由平台统一分配合作商户唯一标识
                'app_id' => 'wx8da0de6f6e0c2a5d', # 微信小程序ID
                'private_cert_path' => BASE_PATH . '/storage/cert/sumpay/shop4/shuxi.pfx',
                'public_cert_path' => BASE_PATH . '/storage/cert/sumpay/shop4/TTFPublicKey.cer',
                'password' => 'shsx2017',
                'eport_code' => '04',
                'eport_company_code' => '31119602H4',
                'eport_company_name' => '上海数析信息技术有限公司'
            ]
        ],
        'chinapnrpayMini' => [
            '6' => [
                'url' => 'https://hfgj.testpnr.com/',
                'mer_no' => '1002025112501', # 会员账号，由我司提供的商户号+01，共13位数字
                'app_id' => 'wxa9d8a2dfcd09df9d',
                'public_cert_path' => BASE_PATH . '/storage/cert/chinapnrpay/shop6/ChinaPnR.rsa.pem',
                'private_cert_path' => BASE_PATH . '/storage/cert/chinapnrpay/shop6/private-rsa.pem',
                'custom_code' => 'SHHG',
                'mer_custom_code' => '44019439DD',
                'mer_custom_name' => '然健环球（中国）日用品有限公司'
            ]
        ]
    ]
];